home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 3_0 / DOUBLEDE / BACKGROU.C < prev    next >
C/C++ Source or Header  |  1988-07-28  |  793b  |  35 lines

  1. #include "shell.h"
  2.  
  3. /*====================================================================
  4.  
  5.     dobkgnd()
  6.     
  7.     routine to handle MultiFinder (app4evt) stuff.  Test bit 7 in the
  8.     EventRecord.message to determine if it is a suspend/resume event,
  9.     and determine which by testing bit 31
  10.     
  11. ====================================================================*/    
  12. dobkgnd()
  13. {
  14.  
  15.     if( BitTst(&event.message,7) ){        /*  suspend/resume event from
  16.                                             MultiFinder                    */
  17.         if(BitTst(&event.message,31)){
  18.         
  19.             /*    resume routines    */
  20.             
  21.             changedscrap();
  22.             if ((w_index=ourwindow(FrontWindow())) >= 0)
  23.                 HiliteControl(demoButton[w_index],ACTIVE);
  24.         }
  25.         else{
  26.         
  27.             /*    suspend routines    */
  28.             
  29.             if ((w_index=ourwindow(FrontWindow())) >= 0)
  30.                 HiliteControl(demoButton[w_index],INACTIVE);
  31.             
  32.         }
  33.     }
  34.  
  35. }